<!-- Put out the parameters associated with a stream generic to
the annotation -->
<xsl:template name="emitParams">
<xsl:apply-templates select="../*[not(self::DICT[@KEY='Mac'] or self::DATA or self::NAME[@KEY='Filter'] or self::ARRAY[@KEY='Filter'] or self::INT[@KEY='Length'])]"/>
</xsl:template>
<!-- Put out the stream parameters specific to
the data of the annotation -->
<xsl:template name="emitRestofParams">
<xsl:apply-templates select="../INT[@KEY='Length']|../../INT[@KEY='Subtype' or @KEY='Creator']"/>
<xsl:apply-templates select="(*[not(self::STRING[@KEY='RC' or @KEY='Contents' or @KEY='DA'] or self::DICT[@DEFINE or @KEY] or self::STREAM or self::APPEARANCE)])|DICT[@KEY='BS' or @KEY='BE']"/>
<xsl:apply-templates select="DICT[@KEY='EF' or @KEY='FS']|STREAM|APPEARANCE"/>
<!-- if both RC and Contents are there
only use RC -->
<xsl:choose>
<xsl:when test="STRING[@KEY='Contents'] and STRING[@KEY='RC']">
<xsl:apply-templates select="STRING[@KEY='RC']"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="STRING[@KEY='Contents' or @KEY='RC']"/>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="STRING[@KEY='DA']"/>
<xsl:apply-templates select="DICT[@DEFINE][not(@KEY='BS' or @KEY='BE' or @KEY='FS' or @KEY='EF')]"/>